import server from "../util/request.js";

// 动态条件查询员工
export function searchEmployees(params) {
    return server({
        url: '/Employee/search',
        method: 'GET',
        params: params // GET请求使用params来传递查询参数
    });
}

// 添加员工
export function addEmployee(data) {
    return server({
        url: '/Employee/add',
        method: 'POST',
        data: data
    });
}

// 更新员工信息
export function updateEmployee(data) {
    return server({
        url: '/Employee/update',
        method: 'PUT',
        data: data
    });
}

// 删除员工
export function deleteEmployee(employeeId) {
    return server({
        url: `/Employee/delete/${employeeId}`,
        method: 'DELETE'
    });
}